* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333333;
}

.container {
    width: 90%;
    max-width: 600px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.container:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #f8f9fa 0%, #ffffff 100%);
    padding: 12px 16px;
    border-bottom: 1px solid #e9ecef;
}

.title {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
}

.controls {
    display: flex;
    gap: 8px;
}

.btn {
    width: 14px;
    height: 14px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.minimize {
    background: #f6c555;
    color: #8a6a1a;
}

.maximize {
    background: #3bcf66;
    color: #1a7a3a;
}

.close {
    background: #fc5f6a;
    color: #8a1a2a;
}

.btn:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.input-area {
    padding: 20px;
    background: #fafbfc;
}

.input-container {
    margin-bottom: 16px;
}

.text-input {
    width: 100%;
    min-height: 120px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    font-size: 16px;
    line-height: 1.6;
    color: #495057;
    resize: vertical;
    font-family: "Microsoft YaHei", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s ease;
}

.text-input:focus {
    outline: none;
    border-color: #4a9eff;
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
}

.text-input::placeholder {
    color: #adb5bd;
}

.candidate-panel {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.candidate-panel:hover {
    border-color: #dee2e6;
}

.candidate-list {
    display: flex;
    gap: 12px;
    flex: 1;
}

.candidate-item {
    padding: 6px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    color: #6c757d;
}

.candidate-item:hover,
.candidate-item.active {
    background: #4a9eff;
    border-color: #5aafff;
    color: white;
    transform: translateY(-1px);
}

.page-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
}

.page-info {
    font-size: 12px;
    color: #6c757d;
    margin: 0 4px;
}

.page-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    color: #6c757d;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
    background: #e9ecef;
    color: #495057;
    border-color: #dee2e6;
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    font-size: 12px;
}

.status-item {
    display: flex;
    gap: 4px;
}

.status-label {
    color: #6c757d;
}

.status-value {
    color: #495057;
    font-weight: 500;
}

.toolbar {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    gap: 8px;
}

.tool-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #dee2e6;
    background: #ffffff;
    color: #6c757d;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.tool-btn:hover {
    background: #f8f9fa;
    color: #495057;
    border-color: #dee2e6;
    transform: translateY(-1px);
}

.tool-btn:active {
    transform: translateY(0);
}

.separator {
    width: 1px;
    height: 20px;
    background: #dee2e6;
    margin: 0 8px;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    animation: fadeIn 0.3s ease;
}

/* 标签容器样式 */
.tags-container {
    margin: 20px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
}

.tags-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(90deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e9ecef;
}

.tags-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.clear-tags-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border: none;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 4px 15px rgba(255,107,107,0.3);
    position: relative;
    overflow: hidden;
}

.clear-tags-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.clear-tags-btn:hover::before {
    left: 100%;
}

.clear-tags-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,107,0.5);
    background: linear-gradient(135deg, #ff5252, #d32f2f);
}

.clear-tags-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255,107,107,0.4);
}

.clear-tags-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.clear-tags-btn:disabled:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(255,107,107,0.3);
}

.tags-title {
    font-size: 16px;
    font-weight: 500;
    color: #495057;
}

.warm-tip-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
    border: none;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 4px 15px rgba(255,154,158,0.3);
    position: relative;
    overflow: hidden;
}

.warm-tip-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.warm-tip-btn:hover::before {
    left: 100%;
}

.warm-tip-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,154,158,0.5);
    background: linear-gradient(135deg, #ff8a8e, #febfd8);
}

.warm-tip-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255,154,158,0.4);
}

.rainbow-btn {
    padding: 8px 16px;
    background: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bcf7f, #4a9eff, #b794f4, #ff6b6b);
    background-size: 200% 100%;
    border: none;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    animation: rainbow-gradient 3s ease infinite;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 4px 15px rgba(255,107,107,0.3);
}

.rainbow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,107,0.5);
    animation-duration: 1s;
}

.rainbow-btn:active {
    transform: translateY(0);
}

@keyframes rainbow-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.tags-list {
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 80px;
    max-height: 300px;
    overflow-y: auto;
    background: #fafbfc;
}

.tags-list::-webkit-scrollbar {
    width: 8px;
}

.tags-list::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.tags-list::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 4px;
}

.tag {
    padding: 8px 16px;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 1px solid #dee2e6;
    border-radius: 20px;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: tag-bounce 0.5s ease;
}

.tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.tag:hover::before {
    left: 100%;
}

.tag:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.3);
    border-color: #4a9eff;
    background: linear-gradient(135deg, #4a9eff, #3a8eef);
}

.tag:active {
    transform: translateY(0) scale(0.95);
}

.tag-remove {
    margin-left: 8px;
    color: #6c757d;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.tag-remove:hover {
    color: #ff6b6b;
}

@keyframes tag-bounce {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}



/* 温馨提示弹窗样式 */
.warm-tip-popup {
    position: fixed;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    animation: warm-tip-bounce 0.6s ease forwards;
    font-family: "微软雅黑", sans-serif;
    min-width: 200px;
    text-align: center;
}

@keyframes warm-tip-appear {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-10deg);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1) rotate(5deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes warm-tip-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translate(-50%, -50%) translateY(0);
    }
    40% {
        transform: translate(-50%, -50%) translateY(-10px);
    }
    60% {
        transform: translate(-50%, -50%) translateY(-5px);
    }
}

@keyframes warm-tip-fade {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}


/* 清除标签相关动画 */
@keyframes clear-particle-fly {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 480px) {
    .container {
        width: 95%;
        margin: 10px;
    }

    .candidate-list {
        flex-wrap: wrap;
        gap: 8px;
    }

    .candidate-item {
        font-size: 12px;
        padding: 4px 8px;
    }

    .status-bar {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .tags-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .tags-controls {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .warm-tip-btn,
    .rainbow-btn,
    .clear-tags-btn {
        width: 100%;
        text-align: center;
    }

    .tag {
        font-size: 12px;
        padding: 6px 12px;
    }
}